﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace ERB.UserControl.Navigation
{
    public partial class NavControlDetail : System.Web.UI.UserControl
    {
        #region Properties
        public string _savescript = "";
        public string savescript
        {
            get { return _savescript; }
            set { _savescript = value; }
        }
        public string _savenewscript = "";
        public string savenewscript
        {
            get { return _savenewscript; }
            set { _savenewscript = value; }
        }
        public string _closescript = "";
        public string closescript
        {
            get { return _closescript; }
            set { _closescript = value; }
        }
        #endregion
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                if (_savescript == "")
                    btnSave.Visible = false;
                else
                    btnSave.ClientSideEvents.Click = _savescript;

                if (_savenewscript == "")
                    btnSaveNew.Visible = false;
                else
                    btnSaveNew.ClientSideEvents.Click = _savenewscript;

                if (_closescript == "")
                    btnClose.Visible = false;
                else
                    btnClose.ClientSideEvents.Click = _closescript;
            }
        }
    }
}